package com.ymatou.query.seller.trading.api.parameter;

public class Convertor {
	public static SellerExportOrderQueryModel SellerExportOrderRequestArguments(
			ExistsSellerExportedOrderInfosBean request) {
		SellerExportOrderQueryModel model = new SellerExportOrderQueryModel();
		model.setSellerId(request.getSellerId());
		model.setProductName(request.getProductName());
		model.setBuyerNickName(request.getBuyerNickName());
		model.setOrderId(request.getOrderId());
		model.setCreatedTime(request.getCreatedTime());
		model.setDeliveredTime(request.getDeliveredTime());
		model.setPaidTime(request.getPaidTime());
		model.setPostpayAppliedTime(request.getPostpayAppliedTime());
		model.setPayTypes(request.getPayTypes());
		ExportOrderInfo.ConstructOrderStatusProperty(model,
				request.getOrderStatus(), request.getLogisticsTypes());
		return model;
	}
	
	public static SellerExportOrderQueryModel SellerExportOrderRequestArguments(
			ExportSellerProductInfosBean request) {
		SellerExportOrderQueryModel model = new SellerExportOrderQueryModel();
		model.setSellerId(request.getSellerId());
		model.setProductName(request.getProductName());
		model.setBuyerNickName(request.getBuyerNickName());
		model.setOrderId(request.getOrderId());
		model.setCreatedTime(request.getCreatedTime());
		model.setDeliveredTime(request.getDeliveredTime());
		model.setPaidTime(request.getPaidTime());
		model.setPostpayAppliedTime(request.getPostpayAppliedTime());
		model.setPayTypes(request.getPayTypes());
		ExportOrderInfo.ConstructOrderStatusProperty(model,
				request.getOrderStatus(), request.getLogisticsTypes());
		return model;
	}

	public static SellerExportOrderQueryModel SellerExportOrderRequestArguments(
			ExistsSellerExportedProductInfosBean request) {
		SellerExportOrderQueryModel model = new SellerExportOrderQueryModel();
		model.setSellerId(request.getSellerId());
		model.setProductName(request.getProductName());
		model.setBuyerNickName(request.getBuyerNickName());
		model.setOrderId(request.getOrderId());
		model.setCreatedTime(request.getCreatedTime());
		model.setDeliveredTime(request.getDeliveredTime());
		model.setPaidTime(request.getPaidTime());
		model.setPostpayAppliedTime(request.getPostpayAppliedTime());
		model.setPayTypes(request.getPayTypes());
		ExportOrderInfo.ConstructOrderStatusProperty(model, request.getOrderStatus(), request.getLogisticsTypes());
		return model;
	}
	
	public static SellerExportOrderQueryModel SellerExportOrderRequestArguments(ExportSellerOrderInfosBean request){
		SellerExportOrderQueryModel model = new SellerExportOrderQueryModel();
		model.setSellerId(request.getSellerId());
		model.setProductName(request.getProductName());
		model.setBuyerNickName(request.getBuyerNickName());
		model.setOrderId(request.getOrderId());
		model.setCreatedTime(request.getCreatedTime());
		model.setDeliveredTime(request.getDeliveredTime());
		model.setPaidTime(request.getPaidTime());
		model.setPostpayAppliedTime(request.getPostpayAppliedTime());
		model.setPartitionKey(request.getPartitionKey());
		model.setPayTypes(request.getPayTypes());
		ExportOrderInfo.ConstructOrderStatusProperty(model, request.getOrderStatus(), request.getLogisticsTypes());
		return model;
	}
}
